﻿using System.Runtime.Serialization;
using CID.Domain.Development;

namespace CID.Execution.Support.Information
{
    [DataContract]
    public class ComponentInfo
    {
        protected ComponentInfo() { }

        public ComponentInfo(IComponent component)
        {
            Id = component.Id;
            Name = component.Name;
        }

        [DataMember]
        public int Id { get; set; }
        
        [DataMember]
        public string Name { get; set; }

        internal ComponentInfo Clone()
        {
            return new ComponentInfo() { Id = Id, Name = Name };
        }
    }
}
